package com.yq.ylmall.api;

import com.yq.ylmall.common.utils.JwtUtils;
import com.yq.ylmall.config.MinioConfig;
import com.yq.ylmall.config.MybatisPlusConfig;
import com.yq.ylmall.service.CacheService;
import com.yq.ylmall.service.MinioService;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.FilterType;

@SpringBootApplication(exclude = DataSourceAutoConfiguration.class)//取消数据源自动配置
@EnableDiscoveryClient
@EnableFeignClients(basePackages = "com.yq.ylmall.client")
@ComponentScan(
        value = "com.yq.ylmall",
        excludeFilters = @ComponentScan.Filter(
                type = FilterType.ASSIGNABLE_TYPE,
                classes = {
                        MinioService.class,
                        MinioConfig.class,
                        CacheService.class,
                        MybatisPlusConfig.class,
                        JwtUtils.class
                }))
public class ServiceApiApplication {

    public static void main(String[] args) {
        SpringApplication.run(ServiceApiApplication.class, args);
    }

}
